package com.permission_server.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @TableName sys_user
 */
@TableName(value = "sys_user")
@Data
@ApiModel(value = "com.permission_server.entity.SysUserEntity", description = "用户实体")
public class SysUserEntity implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID", dataType = "String")
    private String id;

    /**
     * 账号
     */
    @TableField(value = "account")
    @ApiModelProperty(value = "账号", dataType = "String")
    private String account;

    /**
     * 用户名
     */
    @TableField(value = "username")
    @ApiModelProperty(value = "用户名", dataType = "String")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    @ApiModelProperty(value = "密码", dataType = "String")
    private String password;

    /**
     * 盐
     */
    @TableField(value = "salt")
    @ApiModelProperty(value = "盐", dataType = "String")
    private String salt;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    @ApiModelProperty(value = "头像", dataType = "String")
    private String avatar;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(value = "邮箱", dataType = "String")
    private String email;

    /**
     * 电话
     */
    @TableField(value = "phone")
    @ApiModelProperty(value = "电话", dataType = "String")
    private String phone;

    /**
     * 状态(0-正常，1-冻结)
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "状态(0-正常，1-冻结)", dataType = "Boolean")
    private Boolean status;

    /**
     * 删除状态（0-正常，1-已删除）
     */
    @TableField(value = "del_flag")
    @TableLogic
    @ApiModelProperty(value = "删除状态（0-正常，1-已删除）", dataType = "Boolean")
    private Boolean delFlag;

    /**
     * 创建者
     */
    @TableField(value = "create_by")
    @ApiModelProperty(value = "创建者", dataType = "String")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    private Date createTime;

    /**
     * 更新者
     */
    @TableField(value = "update_by")
    @ApiModelProperty(value = "更新者", dataType = "String")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间", dataType = "Date")
    private Date updateTime;

    /**
     * 角色id
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "角色id", required = false, dataType = "List<String>")
    private List<String> roleIds;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
